<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../header.jsp"%>

<div class="left ">
<div class="border bg">
<div class="page-header">
<h2 id="name">通知</h2>
<div class="cms_toolbar">
	<a href="javascript:;" onclick="goBack('./myList.do')" class="btn"><i class="icon-list"></i>返回</a>
</div>
</div>

<div id="noticeDetail">
	<p class="muted">发布人：<span id="creatorName"></span> 发布时间：<span id="createDate"></span></p>
	<textarea id="content" style="width: 95%"></textarea>
</div>
	
</div>
</div>
</div>

<script type="text/javascript">
function loadData() {
	block("#noticeDetail");
	$.ajax({
		type: "GET",
		cache: false,
		url: "read.json?id=" + id,
		dataType: "json",
		success: loadSucceedCallback,
		error:function(message){
			unblock("#noticeDetail");
			$.alert(message);
		}  
	});	
}

function loadSucceedCallback(data) {
	unblock("#noticeDetail");
	if (!data.succeed) {
		$.notice(data.message);
		return;
	}

	var notice = data.data;
	$("#name").text("通知 - " + notice.name);
	$("#creatorName").text(notice.creatorName);
	$("#createDate").text(notice.createDate);
	$("#content").val(notice.content);
	$("#content").focus();
	$("#content").attr("disabled", "disabled");
}

var id = request("id");
$(document).ready(function() {
	$("textarea").tah({
		moreSpace:30,
		maxHeight:65535
	});
	loadData();
});


</script>


<%@ include file="../../footer.jsp"%>